}}
\setuptyping[TEX][
option=tex,% scite sets cld
escape=yes,
]
\starttext
\startTEX
\starttext/BTEX\SAY{Text starts here}/ETEX
\input tufte
\stoptext/BTEX\SAY{Text ends here}/ETEX
\stopTEX
\stoptext
I tried to load the module only in the section where I need it, that
lead to strange errors
=yes,
]
\starttext
\startTEX
\starttext/BTEX\SAY{Text starts here}/ETEX
\input tufte
\stoptext/BTEX\SAY{Text ends here}/ETEX
\stopTEX
\stoptext
___
If your question is of interest to others as well, please add
gt;
# >Maybe it is a misunderstanding but how can use these modules
# >in ConTeXt? I had in mind typesetting the code in ConTeXt
# >like \startTEX etc.
#
# 1. Scite module
#
# \usemodule [scite]
#
# \starttext
#
# \startCPP
# #include
#
# using namespace std;
#
# int main()
# {
#
it is a misunderstanding but how can use these modules
# >in ConTeXt? I had in mind typesetting the code in ConTeXt
# >like \startTEX etc.
#
# Here is an example with the vim module:
#
# \usemodule[vim]
# \definevimtyping[HTML][syntax=html]
# \defi
# or json) but php is still missing.
#
# 2. Use Aditya's vim module which uses vim to highlight source code.
#
# Wolfgang
Maybe it is a misunderstanding but how can use these modules
in ConTeXt? I had in mind typesetting the code in ConTeXt
like \startTEX etc.
1. Scite module
\usemodule [scite]
\st
n) but php is still missing.
#
# 2. Use Aditya's vim module which uses vim to highlight source code.
#
# Wolfgang
Maybe it is a misunderstanding but how can use these modules
in ConTeXt? I had in mind typesetting the code in ConTeXt
like \startTEX etc.
Here is an example with the
e Aditya's vim module which uses vim to highlight source code.
#
# Wolfgang
Maybe it is a misunderstanding but how can use these modules
in ConTeXt? I had in mind typesetting the code in ConTeXt
like \startTEX etc.
Tomáš
_
Pablo Rodriguez schrieb am 13.11.18 um 19:58:
Dear list,
I have the following sample:
\showframe
\setuppapersize[A6]
\setuptyping[TEX][align={right, broad}]
\starttext
\startTEX
\showframe
\setuppapersize[A5]
\setuptyping[TEX][align={right
Dear list,
I have the following sample:
\showframe
\setuppapersize[A6]
\setuptyping[TEX][align={right, broad}]
\starttext
\startTEX
\showframe
\setuppapersize[A5]
\setuptyping[TEX][align={right,broad}]
\starttext
\startTEX
Thanks dr. Hans! It certainly will.
Best Wishes
Keith
On 05/04/2018 19:55, dr. Hans van der Meer wrote:
Maybe this script could help a bit too.
Use with following code scheme in ConTeXt:
\starttex
t\startMPpage
% Your Metapost/metafun code here
\stopMPpage
\stoptext
It will produce
comment: \inlineTEX{ag%befe}
\Lua\ inline comment: \inlineLUA{agb --efe}
\startTEX
This is text. % a comment, not \comment
\stopTEX
\startXML
This is text.
\stopXML
\startLUA
if code=="code" then --this is a comment
\stopLUA
\stopTEXpage
\stoptext
> On 22 Dec 2017, at 4
\context{ag%befe}
>
> \Lua\ inline comment: \lua{agb --efe}
>
> \startTEX
> This is text. % a comment, not \comment
> \stopTEX
>
> \startXML
> This is text.
> \stopXML
>
> \startLUA
> if code=="code" then
}
\Lua\ inline comment: \lua{agb --efe}
\startTEX
This is text. % a comment, not \comment
\stopTEX
\startXML
This is text.
\stopXML
\startLUA
if code=="code" then --this is a comment
\stopLUA
\stopTEXpage
\stoptext
Would it b
On Mon, 18 Dec 2017, Pablo Rodriguez wrote:
\definetype[context][option=tex]
\definetype[lua][option=lua]
\starttext
\startTEXpage[offset=2em]
a \TEX\ inline comment: \context{ag%befe}
\Lua\ inline comment: \lua{agb --efe}
\startTEX
This is text. % a comment
}
\startTEX
This is text. % a comment, not \comment
\stopTEX
\startXML
This is text.
\stopXML
\startLUA
if code=="code" then --this is a comment
\stopLUA
\stopTEXpage
\stoptext
Would it be possible that all comments in type and typing (at least, fo
Hans,
[I have reported this before the meeting, but it was wiser to wait after
the meeting was over.]
I have the following sample:
%~ \usemodule[scite]
\starttext
\startTEXpage[offset=2em]
\startTEX
This is text. % a comment, not \comment
\stopTEX
\startXML
On 8/29/2017 4:43 PM, Pablo Rodriguez wrote:
Dear list,
I have the following sample:
\setuptyping[TEX][lines=yes]
\starttext
\startTEX
code
one line before
two lines before
three lines before
\stopTEX
\stoptext
I thought the lines key should
Dear list,
I have the following sample:
\setuptyping[TEX][lines=yes]
\starttext
\startTEX
code
one line before
two lines before
three lines before
\stopTEX
\stoptext
I thought the lines key should display multiple lines when they are in
the code.
How
[scite]
\setuptyping[TEX][escape={[[,]]}]
\starttext
\startTEX
\test[[\em test]]
\stopTEX
\stoptext
The reported error is:
[ctxlua]:221: attempt to index local 'specification' (a nil value)
stack traceback:
[ctxlua]:221: in function <[ctxlua]:220>
[C]: in function 'lpegmatch'
...ext/tex
\startTEX
\test[[\em test]]
\stopTEX
\stoptext
The reported error is:
[ctxlua]:221: attempt to index local 'specification' (a nil value)
stack traceback:
[ctxlua]:221: in function <[ctxlua]:220>
[C]: in function 'lpegmatch'
...ext/tex/texmf-context/tex/context/base/mkiv/buff-ver.l
[offset=1em]
\startTEX
This is text. % and this is a comment
\stopTEX
\startXML
This is text.
\stopXML
\startLUA
if code=="code" then --this is a comment
--[[
this is a
multiline comment
--]]
---[[
this isn’t a
multili
Dear list,
I have the following sample:
\setuptyping[TEX][lines=no]
\definetyping[TEXlines][lines=yes, option=TEX]
\starttext
\startxtable[frame=off,option=stretch]\startxrow
\startxcell\startTEX
\starttext
Esto
es un
único párrafo.
Y aquí está el
Hans,
I have the following sample:
\starttext
\startTEXpage[offset=1em]
\startTEX
This is text. % and this is a comment
\stopTEX
\startXML
This is text.
\stopXML
\startLUA
if code=="code" then --this is a comment
--[[
and this is a
width=0.5\textwidth,
>>> align=normal,
>>> ]
>>>
>>> \definebuffer
>>> [CodeExample]
>>>
>>> \define\stopCodeExample
>>> {\placesidebyside
>>> {\CodeExampleFramed{\typeCodeExample}}
>>> {\CodeExam
odeExampleFramed{\getCodeExample}}}
Oh, I overlooked something:
Can I get pretty printing back, like in \startTEX ... \stopTEX?
I couldn’t find any suitable setup options.
This doesn’t work:
\setupbuffer[CodeExampleB][before={\startTEX},after={\stopTEX}]
Greetlings, Hraban
---
http:/
pbuffer
> \typebuffer[zB]
> \getbuffer[zB]
> }
>
> \CodeExample{\framed[frame=off,leftframe=on,rulethickness=1em,framecolor=blue]{Klotz
> am Bein}}
>
> Compilation just stops, maybe some infinite loop?
This is what I get from your sample above.
> Simpler:
>
> \def\CodeEx
med[frame=off,leftframe=on,rulethickness=1em,framecolor=blue]{Klotz
am Bein}}
Compilation just stops, maybe some infinite loop?
Simpler:
\def\CodeExample#1{%
\startTEX
#1
\stopTEX
#1
}
Stops with the error:
Use of \m_syst_action_
Dear list,
I have the following sample:
\setupinteraction[state=start,focus=standard, focusoffset=5pt]
\starttext
\index[setuppapersize]{\type{\setuppapersize}}
\startTEX
\setuppapersize[A][A4, landscape]
\setuparranging[2UP, doublesided]
\stopTEX
\blank
?
\setuptyping[TEX]
\startTEX
RSpec.describe Post, :type = :model do
end
\stopTEX
You can add a framedtext environment around the verbatim text and use
“location=middle” to center it.
\setuptyping
[TEX]
[before={\startframedtext[location=middle]},
after=\stopframedtext]
\starttext
cannot figure out how to do that. With the code below how can I
centre the whole block horizontally on the page?
\setuptyping[TEX]
\startTEX
RSpec.describe Post, :type = :model do
end
\stopTEX
You can add a framedtext environment around the verbatim text and use
“location
Hello All,
I am trying to centre a multi-line verbatim text horizontally on the page
but I cannot figure out how to do that. With the code below how can I
centre the whole block horizontally on the page?
\setuptyping[TEX]
\startTEX
RSpec.describe Post, :type = :model do
end
\stopTEX
:
\starttext
\ConTeXt\ rocks!
\stoptext
And what I need (and haven’t been able to explain) is in pure ConTeXt:
\startTEX
\ConTeXt\ rocks!
\stopTEX
If this can be achieved with \xmlcontext{#1}{#2}, I cannot find which
values #2 take (I have no idea of what is expected
And what I need (and haven’t been able to explain) is in pure ConTeXt:
\startTEX
\ConTeXt\ rocks!
\stopTEX
If this can be achieved with \xmlcontext{#1}{#2}, I cannot find which
values #2 take (I have no idea of what is expected there).
Many thanks for your help,
Pablo
--
http
Hi,
How do I escape to TeX from inside an inline typing command? It works fine
from a typing environment.
MWE:
\setuptyping[TEX][escape={[[,]]}]
\definetype[typeTEX][option=TEX]
\starttext
\startTEX
\I\can [[\em escape]]
\stopTEX
\typeTEX{\I\cannot [[\em escape]]}
\stoptext
Thank you for any
Am 17.02.2015 um 16:04 schrieb Christoph Reller christoph.rel...@gmail.com:
Hi,
How do I escape to TeX from inside an inline typing command? It works fine
from a typing environment.
MWE:
\setuptyping[TEX][escape={[[,]]}]
\definetype[typeTEX][option=TEX]
\starttext
\startTEX
Hi,
How do I get rid of the additional line inserted at the end of a TEX or XML
environment?
Minimal working example:
\starttext
\setuptyping[TEX][before=,after=] % - trailing interline space
\hrule
\startTEX
\TeX
\stopTEX
\hrule
\medskip
\setuptyping[XML][before=,after=] % - trailing
\startTEX
This is \TeX\ code % and this is a \TeX\ comment.
\stopTEX
\stoptext
Sorry for not having replied before and many thanks for your help, Wolfgang.
The code works as you told me. I really appreciate your help.
I have a further question about the option=TEX to color code. This was
my
]
\defineprocessor[myescape][style=bold,color=gray, left=\%]
\setuptyping[TEX][escape=myescape-{\%}]
\starttext
\startTEX
This is a c%omment.
% And this is another one.
\command
[with colored]
{brackets}
\stopTEX
\stoptext
But this doesn’t work. I must be missing something obvious.
What am I
with:
\definefontfamily[mainface][mono][DejaVu Sans Mono]
\setupbodyfont[mainface]
\defineprocessor[myescape][style=bold,color=gray, left=\%]
\setuptyping[TEX][escape=myescape-{\%}]
\starttext
\startTEX
This is a c%omment.
% And this is another one.
\command
[with colored]
{brackets}
\stopTEX
there is
an example with \startdocument ... \stopdocument. But I don't
understand where I should use these commands. From the source,
it looks like \starttex ... \stoptext with the ability to register
a before and after command. I am under the impression that I have
to choose between using
\\BzrRevision{\%s},
os.resultofbzr revno | tr -d '\\n')}}
\initializeBzr
\starttex
foo
\stoptex
The error I receive is:
! LuaTeX error [string \directlua ]:1: invalid escape sequence
near '\%'.
system tex
},
os.resultofbzr revno | tr -d '\\n')}}
\initializeBzr
\starttex
foo
\stoptex
The error I receive is:
! LuaTeX error [string \directlua ]:1: invalid escape sequence
near '\%'.
system tex error on line 5 in file minimal.tex
Hello,
I love tabs for some reason. However when I use them inside \startTEX
... \stopTEX they are exactly 1 character long in MKII and of zero
width in MKIV. Is it possible to change that somehow? In particular it
would make sense to have some other default (I would suggest 4, but
anything
On 10-2-2011 9:47, Mojca Miklavec wrote:
Hello,
I love tabs for some reason. However when I use them inside \startTEX
\stopTEX they are exactly 1 character long in MKII and of zero
width in MKIV. Is it possible to change that somehow? In particular it
would make sense to have some other
Because of the new beta I tried it again with a current Mk IV version
(2011.01.18 19:34).
The examples I provided (from the wiki, now abbreviated, with numbering)
have correct line breaks but the second line does not get a number.
\setuptyping[TEX][escape=yes, numbering=line]
\startTEX
/BTEX
=yes]
\startTEX
/BTEX\em sometex/ETEX
/BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX
\before /BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after
\before \after
\stopTEX
\setuptyping[TEX][escape={[[,]]}]
\startTEX
[[\em sometex]]
[[\em
):
\starttext
\setuptyping[TEX][escape=yes]
\startTEX
/BTEX\em sometex/ETEX
/BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX
\before /BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after
\before \after
\stopTEX
\setuptyping[TEX][escape
no effect at all, //
is printed just like normal chars.
Actually in mkii it's
\setuptyping[TEX][escape=/]
\startTEX
/em sometex
\before /em sometex
\stopTEX
Does that mean the example on the wiki page is not correct?
and indeed in mkiv it does not work. I will provide a bit of backward
. The same for ^.
* You need
\starttex(something) (I don't remember on the top of my head)
\def\whatever#1{...}
\stoptex(something)
to change the definition of a macro.
I have never really tested it on a large document. Maybe you can
just add this and see if everything compiles.
Hi
\startformula ... \stopformula to go into display math.
$$...$$ will just print dollars.
* _ in text mode will produce an underscore instead of an error. _ in math
mode will work fine. The same for ^.
* You need
\starttex(something) (I don't remember on the top of my head)
\def\whatever#1{...}
\stoptex
{...}.
* You need \startformula ... \stopformula to go into display math.
$$...$$ will just print dollars.
* _ in text mode will produce an underscore instead of an error. _ in math
mode will work fine. The same for ^.
* You need
\starttex(something) (I don't remember on the top of my
\starttex(something) (I don't remember on the top of my head)
\def\whatever#1{...}
\stoptex(something)
to change the definition of a macro.
I have never really tested it on a large document. Maybe you can
just add this and see if everything compiles.
Hi Aditya, Steffen and others,
I
highlighting with the t-vim
module.
\setbuffer[bla]more bla\endbuffer
That does not work in mkii and does not look right for the user interface.
For pretty printing using the inbuilt macros, one can use
\startTEX
\stopTEX
and \typeTEX{...}
Normally, I want the display version to insert blank
Hello,
is there a way to insert plain tex code in context source ?
example:
\startTEX
\font\ttbold=cmbtt10 at 12pt
{\ttbold texte monospace en gras} ...
\stopTEX
--
René Bastian
www.pythoneon.org
Hello,
IMHO there should never be a page break right *after* a section header, but
here it is:
\starttext
\dorecurse{660}{text }
\section{bla}
% \par\page[no] % does not help
\startTEX
bla
bla
\stopTEX
\stoptext
My actual work-around: \page before \section{}
Is there a better solution?
TIA
On 6-5-2010 2:39, Peter Münster wrote:
Hello,
IMHO there should never be a page break right *after* a section header, but
here it is:
\starttext
\dorecurse{660}{text }
\section{bla}
% \par\page[no] % does not help
\startTEX
bla
bla
\stopTEX
\stoptext
My actual work-around: \page before
trying to create a bibliography database and have, I think,
followed the documentation but to no good result. Myfile.tex contains the
following:
\setupbibtex[database=myfile]
\starttex
\startpublication
...
\stoppublication
\stoptext
texexec --once myfile processes myfile then returns
I am now trying to create a bibliography database and have, I think,
followed the documentation but to no good result. Myfile.tex contains the
following:
\setupbibtex[database=myfile]
\starttex
\startpublication
...
\stoppublication
\stoptext
texexec --once myfile processes myfile then returns
Tom wrote:
I am now trying to create a bibliography database and have, I think,
followed the documentation but to no good result. Myfile.tex contains the
following:
\setupbibtex[database=myfile]
\starttex
\startpublication
...
\stoppublication
\stoptext
texexec --once myfile processes myfile
}
\stopC
\setuptyping[escape=yes]
\startTEX
/BTEX\em sometex/ETEX
/BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX
\before /BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after
\before \after
\stopTEX
\setuptyping[TEX][escape
]
\startTEX
/BTEX\em sometex/ETEX
/BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX
\before /BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after
\before \after
\stopTEX
\setuptyping[TEX][escape=no]
\startTEX
/BTEX\em sometex/ETEX
/BTEX\em
on a project on over the holiday break that will need it.
the beta has:
\starttext
\setuptyping[TEX][escape=yes]
\startTEX
/BTEX\em sometex/ETEX
/BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX
\before /BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex
the holiday break that will need it.
the beta has:
\starttext
\setuptyping[TEX][escape=yes]
\startTEX
/BTEX\em sometex/ETEX
/BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX
\before /BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after
\before
Matthijs Kooijman wrote:
Hi all,
according to the wiki, and the current code, the arguments to
\installprettytype should be uppercased. E.g.:
because want uppercase
\startTEX
\stopTEX
\startMP
\stopMP
\startLUA
\stopLUA
\installprettytype [PHP][PHP]
Referring to them should
Hi Hans,
according to the wiki, and the current code, the arguments to
\installprettytype should be uppercased. E.g.:
\installprettytype [PHP][PHP]
because want uppercase
\startTEX
\stopTEX
Well, those would be coming from the first argument of definetyping. AFAIU,
neither
Matthijs Kooijman wrote:
Hi Hans,
according to the wiki, and the current code, the arguments to
\installprettytype should be uppercased. E.g.:
\installprettytype [PHP][PHP]
because want uppercase
\startTEX
\stopTEX
Well, those would be coming from the first argument
,
prettythree=colorprettythree,
prettyfour=colorprettyfour]
\setuptyping
[TEX]
[palet=MYcolorpretty]
\starttext
\startTEX
\this \is \a \test
\stopTEX
\stoptext
- --
As you will see, there are no colors anymore.
My tex and context
=MYcolorpretty]
\starttext
\startTEX
\this \is \a \test
\stopTEX
\stoptext
- --
As you will see, there are no colors anymore.
My tex and context versions:
This is pdfeTeXk, Version 3.141592-1.20a-2.2 (Web2C 7.5.3) (format=cont-en
2007.1.4) 4 JAN 2007
Aditya Mahajan wrote:
Hi,
How can I define a command that is the inline version of \startTEX ...
\stopTEX. (I need to show inline commands in color). There had been a
discussion on this in the past, and Taco had suggested a solution
http://archive.contextgarden.net/thread/20050907.093522
On Wed, 25 Oct 2006, Hans Hagen wrote:
Aditya Mahajan wrote:
Hi,
How can I define a command that is the inline version of \startTEX ...
\stopTEX. (I need to show inline commands in color). There had been a
discussion on this in the past, and Taco had suggested a solution
http
On Wed, 25 Oct 2006, Aditya Mahajan wrote:
On Wed, 25 Oct 2006, Hans Hagen wrote:
Aditya Mahajan wrote:
Hi,
How can I define a command that is the inline version of \startTEX ...
\stopTEX. (I need to show inline commands in color). There had been a
discussion on this in the past, and Taco
On 10/25/06, Aditya Mahajan [EMAIL PROTECTED] wrote:
On Wed, 25 Oct 2006, Aditya Mahajan wrote:
On Wed, 25 Oct 2006, Hans Hagen wrote:
Aditya Mahajan wrote:
Hi,
How can I define a command that is the inline version of \startTEX ...
\stopTEX. (I need to show inline commands in color
Mojca Miklavec wrote:
On 10/25/06, Aditya Mahajan [EMAIL PROTECTED] wrote:
On Wed, 25 Oct 2006, Aditya Mahajan wrote:
On Wed, 25 Oct 2006, Hans Hagen wrote:
Aditya Mahajan wrote:
Hi,
How can I define a command that is the inline version of \startTEX
Hi,
How can I define a command that is the inline version of \startTEX ...
\stopTEX. (I need to show inline commands in color). There had been a
discussion on this in the past, and Taco had suggested a solution
http://archive.contextgarden.net/thread/20050907.093522.baf795f5.en.html
which
]
\setupcolors[state=start]
\starttext
\startC[tab=2]
if (i == 0) {
a = b;
} else {
a = c;
}
\stopC
\startC[tab=4]
if (i == 0) {
a = b;
} else {
a = c;
}
\stopC
\startTEX[tab=8]
\startC[tab=4]
if (i == 0) {
a = b;
} else {
a = c;
}
\stopC
\stopTEX
{}
\let\next\relax
\else\ifx\next\activeleftargument
\let\next\relax
\else
\let\next\protectedfirsttype
\fi\fi\fi\fi
\next}
\egroup
What exactly should this code do? Was it supposed to change the behaviour of
\startTEX
\abc % comment % comment
\stopTEX
or xmlcode.)
\startTEX ... \stopTEX makes it's own paragraph and \type can't have
any arguments.
Temporary workaround would be to make
\hbox{\startTEX ... \stopTEX textA}textB
but I have to manually determine what to put inside textA (so I can
forget about line breaking algorithm).
And another request
Ciro Soto wrote:
Hello,
I am getting 2 extra pages after the backmatter.
Is there any way delete them?
thank you
Ciro
\starttex
\starfrontmatter
\input frontmatter.tex
\stopfrontmatter
\startbodymatter
\input a_file.tex
\stopbodymatter
\startbackmatter
Hello,
I am getting 2 extra pages after the backmatter.
Is there any way delete them?
thank you
Ciro
\starttex
\starfrontmatter
\input frontmatter.tex
\stopfrontmatter
\startbodymatter
\input a_file.tex
\stopbodymatter
\startbackmatter
\input
Hi all,
I have a following code:
--
\startbuffer
\bTABLE
\bTR
\bTH title1 \eTH
\bTH title2 \eTH
\eTR
\bTR
\bTD data1 \eTD
\bTD data2 \eTD
\eTR
\eTABLE
\stopbuffer
\startTEX
\getbuffer
\stopTEX
\getbuffer
VnPenguin wrote:
Hi all,
I have a following code:
--
\startbuffer
\bTABLE
\bTR
\bTH title1 \eTH
\bTH title2 \eTH
\eTR
\bTR
\bTD data1 \eTD
\bTD data2 \eTD
\eTR
\eTABLE
\stopbuffer
\startTEX
\getbuffer
\stopTEX
\getbuffer
81 matches
Mail list logo